package com.richard.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.richard.myapplication.fineViewPager.FineViewPagerActivity;
import com.richard.myapplication.nestedScroll2.NestedScroll2Activity;
import com.richard.myapplication.slideview.MainActivitySlideView;
import com.richard.myapplication.smallViewpager.SmallViewPagerActivity;
import com.richard.myapplication.stretchPager.StretchViewPagerActivity;

public class StartActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_start_activity);

        findViewById(R.id.btn_over_scroll).setOnClickListener(this);
        findViewById(R.id.btn_small_pager).setOnClickListener(this);
        findViewById(R.id.btn_fine_pager).setOnClickListener(this);
        findViewById(R.id.btn_stretch_pager).setOnClickListener(this);
        findViewById(R.id.btn_stretch_nested_scroll).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.btn_over_scroll:
                Intent overScrollIntent = new Intent(this, MainActivitySlideView.class);
                startActivity(overScrollIntent);
                break;
            case R.id.btn_small_pager:
                Intent smallVpIntent = new Intent(this, SmallViewPagerActivity.class);
                startActivity(smallVpIntent);
                break;
            case R.id.btn_fine_pager:
                Intent fineVpIntent = new Intent(this, FineViewPagerActivity.class);
                startActivity(fineVpIntent);
                break;
            case R.id.btn_stretch_pager:
                Intent stretchVpIntent = new Intent(this, StretchViewPagerActivity.class);
                startActivity(stretchVpIntent);
                break;
            case R.id.btn_stretch_nested_scroll:
                Intent nestedScrollIntent = new Intent(this, NestedScroll2Activity.class);
                startActivity(nestedScrollIntent);
                break;
        }
    }
}
